package com.example.micrometerdemo.utils;

import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MetricUtils {
    private static MeterRegistry meterRegistry;
    @Autowired
    public MetricUtils(MeterRegistry meterRegistry){
        MetricUtils.meterRegistry=meterRegistry;
    }

    public static MeterRegistry getMeterRegistry(){
        return meterRegistry;
    }
}
